package com.itopia.team04.models;
import com.itopia.team04.MenuActivity;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

public class MenuFragment extends ListFragment {

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		setListAdapter(new ArrayAdapter<String>(getActivity(),
				android.R.layout.simple_list_item_1, new String[] { " All Content", " News", " Features", " Reviews", " Testlab", " Podcast", " About"}));
		getListView().setCacheColorHint(0);
	}
	
	


	@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {		
		super.onViewCreated(view, savedInstanceState);	
		view.setBackgroundColor(Color.BLACK);		
	}

	@Override
	public void onListItemClick(ListView l, View v, int position, long id) {		
		super.onListItemClick(l, v, position, id);	
		
		switch(position)
		{
		case 0:
			System.out.println("All content");
			break;
		case 1:
			System.out.println("News");
			break;
		case 2:
			break;		
		}
		
		((MenuActivity)getActivity()).getSlideMenuHelper().close();
	}
	
}
